package com.subaiwang.pojo;

import javax.persistence.*;

@Entity
@Table(name = "encyclopedias_type", schema = "subaiwang", catalog = "")
public class EncyclopediasType {
    private long id;
    private String type;
    private String typelink;

    @Id
    @Column(name = "id")
    public long getId() {
        return id;
    }

    public void setId(long id) {
        this.id = id;
    }

    @Basic
    @Column(name = "type")
    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    @Basic
    @Column(name = "typelink")
    public String getTypelink() {
        return typelink;
    }

    public void setTypelink(String typelink) {
        this.typelink = typelink;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        EncyclopediasType that = (EncyclopediasType) o;

        if (id != that.id) return false;
        if (type != null ? !type.equals(that.type) : that.type != null) return false;
        if (typelink != null ? !typelink.equals(that.typelink) : that.typelink != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = (int) (id ^ (id >>> 32));
        result = 31 * result + (type != null ? type.hashCode() : 0);
        result = 31 * result + (typelink != null ? typelink.hashCode() : 0);
        return result;
    }
}
